There are various forms of creating a program that causes a computer to execute the processings of acquiring data stored in memory regions of a main memory, on the basis of arrays prescribed by plural variables, and carrying out a given computation on the basis of the acquired data. For example, there is the changing of the order of variables that are to be varied, and the like. Memory regions of the main memory must be accessed when executing a program that has been created in a given form. Because accessing the memory regions of the main memory takes time, a long time is needed also until completion of execution of the program.
A cache memory is conventionally used in order to improve the time to access the main memory. The storage capacity of a cache memory is smaller than the storage capacity of a main memory, but the access time of a cache memory is shorter than the access time of a main memory. Accordingly, the processor stores data, that has been obtained by accessing the main memory, in the cache memory, and when this data must be accessed a next time, initially, the cache memory is accessed and the data is acquired. The access time is improved by accessing the cache memory and not accessing the main memory in this way.
In this way, by utilizing the cache memory, the time until completion of execution of a program can be shortened. However, there are cases in which the time until completion of execution of a program can be shortened further by changing the above-described form of the program, that was created in the above-described form, to another form.
By the way, when changing the order of variables, the order of accessing the memory regions of the main memory changes, and accordingly, the order of accessing the cache sets of the cache memory also changes. When the order of accessing the cache sets changes in this way, there are cases in which, for a given cache set, the needed data is stored (a hit) if the order of access is the previous order, whereas, due to the order being changed, the needed data is no longer stored (a miss).
Accordingly, in order to learn which way of changing the order of the variables will enable shortening of the time until completion of execution of the program, it is necessary to know the hit and miss information (profile data) for each cache set of the cache memory.
Acquisition of the profile data of all of the cache sets of a cache memory has conventionally been carried out.